<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>分拣</title>
    <link href="/page/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
    <link href="/page/dist/css/bootstrap-dialog.min.css" rel="stylesheet">
    <link href="/page/dist/css/bootstrap-select.min.css" rel="stylesheet">
    <link href="/page/dist/css/bootstrap-table.min.css" rel="stylesheet">
    <link href="/page/build/css/index.css" rel="stylesheet"/>
    <link href="/page/css/index.css" rel="stylesheet"/>
    <link rel="shortcut icon" href="#"/>
    <script type="text/javascript" src="/page/dist/js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/bootstrap-select.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/i18n/defaults-zh_CN.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/bootstrap-dialog.min.js"></script>
    <script type="text/javascript" src="/page/js/socket/socket.io.js"></script>
    <script type="module" src="/page/js/cookie/js.cookie-2.2.1.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/bootstrap-table.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/i18n/bootstrap-table-zh-CN.min.js"></script>
    <script type="text/javascript" src="/page/dist/js/jquery.serializejson.min.js"></script>
</head>
<body>
<div class="container-fluid">
    <div class="row">
    </div>
    <div class="row">
        <!--货箱数据列表-->
        <div class="table table-responsive hidden" id="table-box-id">
            <table class="table" id="box-list-table" style="text-align: center;">
            </table>
        </div>
        <div class="form-inline">
            <div class="col-md-5">
                <h4 style="text-align: center;">
                    <strong>
                        <span>地平仓物件领取</span>
                        <span id="spu-box-code"></span>
                    </strong>
                </h4>
                <img src="/page/img/backgroud.jpg" id="spu-img" style="max-height: 370px;min-height:370px;" alt="..."
                     class="img-responsive center-block"/>
                <!--<h3>货箱可分拣原料重量：<span id="spu-weight"></span></h3>-->
            </div>
            <div class="col-md-4">
                <h4 style="text-align: left;">
                    <strong>
                        <span></span>
                        <span id="warehouse-number" style="font-size: 30px;color: red;"></span>
                    </strong>
                </h4>
            </div>
            <div class="col-md-7">
                <div class="table table-responsive" id="table-sort-id">
                    <table class="table table-responsive" id="sort-table"
                           style="text-align: center;">
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="modal fade" id="frm-lose-model" tabindex="0" role="dialog" aria-labelledby="frm-lose-label">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="frm-lose-label">原料报损</h4>
                    </div>
                    <div class="modal-body">
                        <form id="form-frm-lose">
                            <div class="form-group">
                                <label for="frm-lose-select" class="control-label">报损原料：</label>
                                <select id="frm-lose-select" class="selectpicker select-frm-info form-control" data-live-search="true">
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="frm-lose-weight" class="control-label">报损重量:</label>
                                <input type="text" class="form-control" id="frm-lose-weight" name="weight"/>
                            </div>
                            <input type="hidden" name="goodsBoxDetailId" id="goods-detail-id"/>
                            <input type="hidden" name="boxCode" id="from-lose-goods-detail-box-code"/>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal" onclick="frmLoseClick(false)">取消</button>
                        <button type="button" class="btn btn-primary" id="frm-loss-button" onclick="frmLoseClick(true)">报损</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="modal fade" id="frm-demotion-model" tabindex="-1" role="dialog" aria-labelledby="frm-spu-label">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">×</span></button>
                        <h4 class="modal-title" id="frm-spu-label">原料降级</h4>
                    </div>
                    <div class="modal-body">
                        <form id="form-frm-demotion">
                            <div class="form-group">
                                <label for="frm-spu-select" class="control-label">原料：</label>
                                <select id="frm-spu-select" class="selectpicker select-spu-info form-control" data-live-search="true">
                                </select>
                            </div>

                            <div class="form-group">
                                <label for="frm-spu-grade-select" class="control-label">降级到：</label>
                                <select id="frm-spu-grade-select" class="selectpicker select-spu-grade-info form-control" data-live-search="true">
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="demotion-standard-select" class="control-label">降级标准：</label>
                                <select id="demotion-standard-select" class="selectpicker select-standard-info form-control" data-live-search="true" multiple>
                                </select>
                            </div>
                            <input type="hidden" name="goodsBoxDetailId" id="demotion-goods-detail-id"/>
                            <input type="hidden" name="boxCode" id="demotion-goods-detail-box-code"/>
                            <input type="hidden" name="spuGradeId" id="spu-grade-id"/>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        <button type="button" class="btn btn-primary" onclick="demotionClick()">降级</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <form class="hidden" id="form-param">
        <input type="hidden" name="upOrDownPolicy[boxCode]" id="ware-box-code" th:value="TM0000000000"/>
        <input type="hidden" name="upOrDownPolicy[boxType]" th:value="1" id="box-type"/>
        <input type="hidden" name="upOrDownPolicy[clientId]" th:value="${clientId}" id="client-id"/>
        <input type="hidden" name="upOrDownPolicy[consoleId]" th:value="0"/>
        <input type="hidden" name="upOrDownPolicy[downToLocation]" th:value="1"/>
        <input type="hidden" name="upOrDownPolicy[totalWeight]" th:value="0" id="total-weight"/>
        <input type="hidden" name="upOrDownPolicy[operationType]" th:value="2" id="operation-type"/>
        <input type="hidden" name="upOrDownPolicy[sortWeight]" th:value="0" id="sort-act-weight"/>
        <input type="hidden" name="goodsBox[boxCode]" id="goods-box-code" th:value="TM0000000000"/>
        <input type="hidden" name="goodsBox[inspectType]" th:value="1"/>
        <input type="hidden" name="goodsBox[warehouseId]" th:value="1"/>
        <!--<input type="hidden" name="goodsBox[temperatureZoneCode]" th:value="101" id="temperatureZoneCode"/>-->
        <input type="hidden" name="outboundAndEntry" th:value="true" id="outboundAndEntry"/>
        <input type="hidden" name="bigProduct" th:value="1" id="bigProduct"/>
    </form>
</div>
<footer class="navbar-fixed-bottom" style="background: rgba(0,0,0,.7)">
    <div class="container">
        <div class="col-md-4">
            <div class="form-inline">
                <div class="form-group">
                    <span id="weight" style="color: #fff;">分拣重量：</span>
                    <input id="sort-weight" type="text" class="form-control disable"
                           style="width: 120px; border: 0; background-color: #f5fee3;font-size: 25px; color: red;text-align: center;">
                    <span id="pro-unit" style="color: #fff;">克</span>
                </div>
                <div class="form-group" style="margin-left: 10px;">
                    <button class="btn btn-primary" id="check-weight">称&nbsp;&nbsp;重
                    </button>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="form-inline">
                <div class="form-group" style="margin-left: 50px;">
                    <button class="btn btn-primary" id="refresh-local-page" onclick="refreshLocalPage()" data-toggle="tooltip" data-placement="top" title="刷新">刷新
                    </button>
                </div>

                <!--<button class="btn btn-primary pull-right" id="sort-change-shifts" style="margin-left: 10px;" data-toggle="tooltip" data-placement="top" title="工作人员换班时">交接班
                </button>-->
                <!--<button class="btn btn-primary pull-right" id="sort-demotion" style="margin-left: 10px;" onclick="demotion()" data-toggle="tooltip" data-placement="top" title="原料与当前等级不符时">原料降级
                </button>-->
                <button class="btn btn-primary pull-right" id="sort-frmLoss" style="margin-left: 10px;" onclick="frmLose()" data-toggle="tooltip" data-placement="top" title="原料出现损坏时">原料报损
                </button>
                <!--<button class="btn btn-primary pull-right" id="sort-handle" onclick="handle()">分拣加工
                </button>-->
            </div>
        </div>
    </div>
</footer>
</body>
<script type="text/javascript" src="/page/js/common.js"></script>
<script type="text/javascript" src="/page/js/wms/large.js"></script>
<script type="text/javascript" src="/page/build/index.js"></script>
<script type="text/javascript" src="/page/js/socket.con.js"></script>
</html>